﻿/* 9. Write a program that prints an isosceles triangle of 9 copyright symbols ©. 
 * Use Windows Character Map to find the Unicode code of the © symbol. 
 * Note: the © symbol may be displayed incorrectly. */

using System;
using System.Text;

public class IsoscelesTriangle
{
    public static void Main()
    {
        char symbol = '\u00A9';
        int symbols;

        Console.WriteLine("\n {0} {0} {0} {0}\n\n {0}   {0}\n\n {0} {0}\n\n {0}\n", symbol);
        Console.WriteLine();

        Console.Write("Enter a perfect square: ");
        symbols = int.Parse(Console.ReadLine());
        ushort rows = (ushort)Math.Sqrt(symbols);
        Console.WriteLine();
        for (ushort row = 0; row < rows; row++)
            Console.WriteLine("{0}{1}", 
                new string(' ', (rows - 1 - row + 1)), new string(symbol, (2 * row + 1)));

        Console.WriteLine();
    }
}